
LoginPanel = {};

local this=LoginPanel;

local transform;
local gameObject;
local behaviour;

function LoginPanel.New()
    panelMgr:CreatePanel('Login',nil);
    

end

--启动事件
function LoginPanel.Awake(obj)
     logWarn("LoginPanel.Awake")
     gameObject = obj;
     transform = obj.transform;
    -- transform.localPosition=Vector3.zero;
     behaviour = obj:GetComponent('LuaBehaviour');
     this.InitView();  
end
function LoginPanel.InitView()
     local openBtn = transform:Find("Open").gameObject;
     behaviour:AddClick(openBtn,this.OnOpenClick);
end
function LoginPanel.Start()
    logWarn("LoginPanel.Start");
end
function LoginPanel.OnOpenClick()
    GamePanel.New()
    panelMgr:ClosePanel('Login');
    
end
